
using System;
using System.Data ;
using System.Collections;
using System.Collections.Specialized;
using WP.DB; 
using WP.Commons;

namespace WP.MF.DataAccess
{
    public class MDftPostPrintStatusDAL
    {

        public MDftPostPrintStatusDAL() { }

        //public string SQLList(int iParameter)
        //{
        //    string strSQL = @"SELECT RecID,PostModule,PrintStatus FROM mDftPostPrintStatus order by PostModule";
        //    return strSQL;
        //}

        public string strFields
        {
            get
            {
                return @"PrintStatus";
            }
        }

        public void Update(DBAccess dBAccess, DataRow dr)
        {
            DataFunctions.UpdateTable(dBAccess, strFields, "mDftPostPrintStatus", dr);  
        }

        public void UpdateTable(DBAccess dBAccess,DataView dv)
        {
            DataTable dt = dv.ToTable();
            foreach (DataRow dr in dt.Rows)
            {
                this.Update(dBAccess, dr);
            }
            //DataGridView gridView = obGrid as DataGridView;
            //if (gridView != null)
            //{
            //    for (int i = 0; i < gridView.Rows.Count; i++)
            //    {
            //        DataRow dr = dBAccess.GetDataSet("select top 0 * from mDftPostPrintStatus").Tables[0].NewRow();
            //        BaseFunctions.FillDataRowByGridRow(gridView.Rows[i],dr);
            //        this.Update(dBAccess,dr);

            //    }
            //}
        }

       
    }
}
